home *** CD-ROM | disk | FTP | other *** search
/ Alde ADA 5 #1 / ADA CD-ROM - Alde Publishing.iso / online / help.ex < prev    next >
Encoding:
Text File  |  1988-05-03  |  10.3 KB  |  322 lines

  1.         BRINGING UP THE ADA REPOSITORY HELP SYSTEM
  2.  
  3.             by Richard Conn
  4.  
  5.  
  6.     The following is a terminal session which illustrates the steps
  7. which may be taking in bringing up the Help System available for the
  8. DoD Ada Software Repository on SIMTEL20.  The actual displays may vary
  9. from system to system due to differences in the programs used, particularly
  10. the FTP (File Transfer Protocol) program and your Ada compiler.
  11.  
  12.     This session was performed on a VAX 11/785 running VMS 4.2 and
  13. DEC Ada V1.1-10.  The Defense Data Network host computer is NOSC-TECR.
  14.  
  15.     Comments, prefixed with "--", are scattered throughout the session.
  16.  
  17.     Address questions to ADA-SW-REQUEST@SIMTEL20.
  18.  
  19.  
  20. -- Session Begins
  21. -- Run the FTP program, connect to the SIMTEL20 host computer,
  22. --  log in, and obtain the files HELP.SRC and HELP.DAT from the
  23. --  directory PD:<ADA.ONLINE-DOC>
  24.  
  25.  
  26. $ ftp simtel20
  27.  Connection Opened
  28.  Using 8-bit bytes.
  29. <SIMTEL20.ARPA FTP Server Process 5Z(37)-7 at Tue 3-Dec-85 23:29-MST
  30. NOSC-TECR FTP User Process (Version 3.00)
  31. *login anonymous
  32. <ANONYMOUS user ok, send real ident as password.
  33. Password: 
  34. <User ANONYMOUS logged in at Tue 3-Dec-85 23:29-MST, job 20. 
  35. *get pd:<ada.online-doc>help.src help.src
  36. <Port 10.99 at host 26.1.0.35 accepted.
  37. <ASCII retrieve of PD:<ADA.ONLINE-DOC>HELP.SRC.1 started.
  38. 59644 bytes in 19 seconds--25112 bps
  39. <Transfer completed. 61868 (8) bytes transferred.
  40. *get pd:<ada.online-doc>help.dat help.dat
  41. <Port 10.100 at host 26.1.0.35 accepted.
  42. <ASCII retrieve of PD:<ADA.ONLINE-DOC>HELP.DAT.3 started.
  43. 6715 bytes in 2 seconds--26856 bps
  44. <Transfer completed. 6933 (8) bytes transferred.
  45. *quit
  46. exit
  47.  
  48. $ dir
  49.  
  50. Directory DBA4:[CONTR13.DEMO]
  51.  
  52. HELP.DAT;1               14  (RE,RWED,RE,RE)
  53. HELP.SRC;1              123  (RE,RWED,RE,RE)
  54.  
  55. Total of 2 files, 137 blocks.
  56.  
  57. --
  58. -- Run the PAGER tool to tear apart the paged HELP.SRC file into its
  59. --  component files.  The PAGER tool's source code and documentation
  60. --  can be found in PD:<ADA.STARTER-KIT>
  61.  
  62.  
  63. $ pager
  64. PAGER, Version 1.6
  65. Type HELP for Help
  66. PAGER> unpage help.src
  67.      help.dis
  68.             25 Lines
  69.      help_sysdep.ada
  70.             84 Lines
  71.      help.ada
  72.            718 Lines
  73.      help_analyze.ada
  74.            274 Lines
  75.      help_build.ada
  76.            239 Lines
  77.      help.doc
  78.            620 Lines
  79.      help.rno
  80.            243 Lines
  81. PAGER> x
  82.  
  83.  
  84. -- Now edit the file HELP_SYSDEP.ADA, which is the system-dependencies
  85. --  file.  The only change I made in this edit session is the name of
  86. --  the default Help file.  I could have also changed other parameters,
  87. --  such as the sequence required to clear the CRT screen, if I desired.
  88.  
  89.  
  90. $ ed help_sysdep.ada
  91.  
  92.     1       
  93.  
  94. *%wh
  95.  
  96.     1       
  97.     2       --|MODULE: HELP_SYSDEP
  98.     3       --|AUTHOR: CONN
  99.     4       --|LOCATION: PDL-TOOLS
  100.     5       --|SEE_ALSO: HELP
  101.     6       --|SEE_ALSO: HELP_ANALYZE
  102.     7       --|SEE_ALSO: HELP_BUILD
  103.     8       --|IEEE_PDL: SUPPORT_MODULE
  104.     9       --|DESIGN_STATUS         : DONE
  105.    10       --|IMPLEMENTATION_STATUS : DONE
  106.    11       --|DOCUMENTATION_STATUS  : DONE
  107.    12       --|DATE_RELEASED         : 9 Sep 85
  108.    13       --|DATE_LAST_MODIFIED    : 11 Sep 85
  109.    14       --|ABSTRACT:
  110.    15       --|     HELP_SYSDEP is a Systems-Dependency package for the HELP
  111.    16       --| system of programs.  It contains terminal-specific information
  112.    17       --| (such as the number of lines on a screen and number of columns)
  113. .
  114.    18       --| Other information is also provided, including a CLEAR_SCREEN
  115.    19       --| routine.  If more than one terminal is to be used and/or a
  116.    20       --| clear screen or different clear screen sequences are used or
  117.    21       --| not available, simply make the body of this routine a "null;";
  118.    22       --| if only one terminal is used or several terminal types with the
  119.    23       --| same clear screen sequence, set up the CLEAR_SCREEN routine to
  120.    24       --| issue this sequence.  
  121.    25       -- 
  122.    26       with DIRECT_IO; 
  123.    27       package HELP_SYSDEP is 
  124.    28       
  125.    29       -- 
  126.    30       -- HELP_FILE_NAME is the default name of the help file
  127.    31       -- It may be a fully-qualified file name (which includes directory 
  128. reference)
  129.    32       -- so that the program will find it from any directory the program 
  130. runs from.
  131.    33       -- 
  132.    34         HELP_FILE_NAME : constant STRING := "USER4:[ADAREPOS.TIPDL.EXE]PD
  133. L_TOOLS.HLP"
  134.    35           ; 
  135.    36       
  136.    37         -- 
  137.    38         -- SCREEN_WIDTH and SCREEN_LENGTH are terminal attributes
  138.    39         -- 
  139.    40         SCREEN_WIDTH   : constant NATURAL := 75; 
  140.    41         SCREEN_LENGTH  : constant NATURAL := 23; 
  141.    42       
  142.    43         -- 
  143.    44         -- Description of a screen
  144.    45         -- 
  145.    46         subtype SCREEN_TEXT is STRING(1 .. SCREEN_WIDTH); 
  146.    47         type SCREEN_LINE is 
  147.    48           record
  148.    49             LINE : SCREEN_TEXT; 
  149.    50             LAST : NATURAL; 
  150.    51           end record; 
  151.    52         type SCREEN_LINE_ARRAY is array(1 .. SCREEN_LENGTH) of SCREEN_LIN
  152. E; 
  153.    53         type SCREEN is 
  154.    54           record
  155.    55             LINES : SCREEN_LINE_ARRAY; 
  156.    56             LAST  : NATURAL; 
  157.    57           end record; 
  158.    58       
  159.    59           -- 
  160.    60           -- System-Dependent (Terminal-Dependent) Clear Screen routine
  161.    61           -- If not implemented, should contain a body of "null;"
  162.    62           -- 
  163.    63         procedure CLEAR_SCREEN; 
  164.    64       
  165.    65         -- 
  166.    66         -- Random-Access File I/O for HELP programs
  167.    67         -- 
  168.    68         package SDIRECT is 
  169.    69           new DIRECT_IO(ELEMENT_TYPE => SCREEN); 
  170.    70       
  171.    71       end HELP_SYSDEP; 
  172.    72       
  173.    73       with TEXT_IO; 
  174.    74       package body HELP_SYSDEP is 
  175.    75       
  176.    76         procedure CLEAR_SCREEN is 
  177.    77         begin
  178.    78           TEXT_IO.PUT(ASCII.ESC); 
  179.    79           TEXT_IO.PUT_LINE("[2J"); 
  180.    80           TEXT_IO.PUT(ASCII.ESC); 
  181.    81           TEXT_IO.PUT("[1;1H"); 
  182.    82         end CLEAR_SCREEN; 
  183.    83       
  184.    84       end HELP_SYSDEP; 
  185. [EOB]
  186.  
  187. *'user4'
  188.  
  189.    34         HELP_FILE_NAME : constant STRING := "USER4:[ADAREPOS.TIPDL.EXE]PD
  190. L_TOOLS.HLP"
  191.  
  192. -- Here is where I make the substitution:
  193. --  Change "USER4:[ADAREPOS.TIPDL.EXE]PDL_TOOLS" into
  194. --  "DBA4:[CONTR13.EXE]AHELP"
  195. --  The new line is indicated, and the default help file is named AHELP.HLP
  196.  
  197.  
  198. *s/USER4:[ADAREPOS.TIPDL.EXE]PDL_TOOLS/DBA4:[CONTR13.EXE]AHELP/
  199.  
  200.    34         HELP_FILE_NAME : constant STRING := "DBA4:[CONTR13.EXE]AHELP.HLP"
  201. 1 substitution
  202.  
  203. *exit
  204.  
  205. DBA4:[CONTR13.DEMO]HELP_SYSDEP.ADA;2 84 lines
  206.  
  207. -- Now, I create a library to contain the object files generated by the
  208. --  Ada compilations (which will be performed shortly) and identify this
  209. --  library as the one I wish to use.  Such is the purpose of the two ACS
  210. --  commands which follow.
  211.  
  212.  
  213. $ acs create library [.lib]
  214.  
  215.     Library DBA4:[CONTR13.DEMO.LIB] created
  216.  
  217. $ acs set library [.lib]
  218.  
  219.     Current program library is DBA4:[CONTR13.DEMO.LIB]
  220.  
  221. -- The following are the compilations and links required.  HELP_SYSDEP.ADA
  222. --  must be compiled before the tools.  The tools are HELP_ANALYZE.ADA,
  223. --  HELP_BUILD.ADA, and HELP.ADA, and they may be compiled in any order after
  224. --  HELP_SYSDEP.ADA has been compiled.
  225.  
  226.  
  227. $ ada help_sysdep
  228.  
  229. $ ada help_analyze
  230.  
  231. $ ada help_build
  232.  
  233. $ ada help
  234.  
  235. $ acs link help_analyze
  236.  
  237. Invoking the VAX/VMS Linker
  238.  
  239. $ acs link help_build
  240.  
  241. Invoking the VAX/VMS Linker
  242.  
  243. $ acs link help
  244.  
  245. Invoking the VAX/VMS Linker
  246.  
  247. -- Finally, I run HELP_BUILD to create the required Direct-Access file
  248. --  (named AHELP.HLP from my edit of HELP_SYSDEP.ADA) from the data file
  249. --  I copied from SIMTEL20 (which was HELP.DAT).
  250.  
  251.  
  252. $ run help_build
  253. HELP File Builder, Version 1.0
  254. Source Text File                       > help.dat
  255. Help File to Build (RETURN for Default)> 
  256. Number of Screens Written:    28
  257. Number of Headers Written:    28
  258.  
  259. -- HELP_ANALYZE displays the contents of the Direct-Access file created
  260. --  by HELP_BUILD
  261.  
  262.  
  263. $ run help_analyze
  264. HELP Analyzer, Version 1.0
  265. Help File (RETURN for Default)> 
  266. 1 ADA: Start =   1   Stop =   1
  267. 1 BENCHMARKS: Start =   2   Stop =   2
  268. 1 COMPILATION-ORDER: Start =   3   Stop =   3
  269. 1 COMPONENTS: Start =   4   Stop =   4
  270. 1 CROSS-REFERENCE: Start =   5   Stop =   5
  271. 1 DDN: Start =   6   Stop =   6
  272. 1 EDITORS: Start =   7   Stop =   7
  273. 1 EDUCATION: Start =   8   Stop =   8
  274. 1 EXTERNAL-TOOLS: Start =   9   Stop =   9
  275. 1 FORMGEN: Start =  10   Stop =  10
  276. 1 GENERAL: Start =  11   Stop =  11
  277. 1 GKS: Start =  12   Stop =  12
  278. 1 MANAGEMENT-TOOLS: Start =  13   Stop =  13
  279. 1 MATH: Start =  14   Stop =  14
  280. 1 MENU: Start =  15   Stop =  15
  281. 1 MESSAGE-HANDLING: Start =  16   Stop =  16
  282. 1 METRICS: Start =  17   Stop =  17
  283. 1 NOSC-TOOLS: Start =  18   Stop =  18
  284. 1 PAGER: Start =  19   Stop =  19
  285. 1 POINTERS: Start =  20   Stop =  20
  286. 1 PRETTY-PRINTERS: Start =  21   Stop =  21
  287. 1 SPELLER: Start =  22   Stop =  22
  288. 1 STARTER-KIT: Start =  23   Stop =  23
  289. 1 STUBBER: Start =  24   Stop =  24
  290. 1 STYLE: Start =  25   Stop =  25
  291. 1 TOOLS: Start =  26   Stop =  26
  292. 1 VIRTERM: Start =  27   Stop =  27
  293. 1 SPECIAL_NOTES: Start =  28   Stop =  28
  294.  
  295. -- Finally, HELP runs the Help System on the default Help file AHELP.HLP
  296.  
  297.  
  298. $ run help
  299. HELP, Version 1.2
  300. Help File (RETURN for Default)> 
  301. ADA                   BENCHMARKS            COMPILATION-ORDER     
  302. COMPONENTS            CROSS-REFERENCE       DDN                   
  303. EDITORS               EDUCATION             EXTERNAL-TOOLS        
  304. FORMGEN               GENERAL               GKS                   
  305. MANAGEMENT-TOOLS      MATH                  MENU                  
  306. MESSAGE-HANDLING      METRICS               NOSC-TOOLS            
  307. PAGER                 POINTERS              PRETTY-PRINTERS       
  308. SPELLER               STARTER-KIT           STUBBER               
  309. STYLE                 TOOLS                 VIRTERM               
  310. SPECIAL_NOTES         
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324. Level  0 Menu: (Exit, Selection)  math
  325. 1 MATH
  326.  
  327.         This  subdirectory  contains  packages  of math routines.  All
  328. routines are written in Ada.  Routines for trig functions, exponential
  329. functions,  matrix  manipulation,  bit  manipulation,  and  others are
  330. contained here.
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348. Level  0 Topic: 1 MATH (Print, Exit, Up)  x
  349.  
  350.  
  351.